Skip to content

Conversation

jeffcunat
Copy link
Contributor

Hello I had a problem using classes function on svg elements (same as #362).
This pull request should fix it as className returns a SVGAnimatedString object for svg elements instead of a simple string.
See notes in [(https://developer.mozilla.org/fr/docs/Web/API/Element/className)]

Copy link
Member

@eddyerburgh eddyerburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

Can you add a unit test to check this please

@jeffcunat
Copy link
Contributor Author

Hello Edd,
First of all, nice work with vue-test-utils, I use it every day now !
I have modified the unit test for classes to test svg elements. With dev branch it says :
TypeError: this.element.className.split is not a function
With the PR everything's OK

Copy link
Member

@eddyerburgh eddyerburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test 😀

@eddyerburgh eddyerburgh merged commit bcf580e into vuejs:dev Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants